home *** CD-ROM | disk | FTP | other *** search
- (*===========================================================================*)
- (* Forward task -- Wait for prompt *)
- (* *)
- (* Copyright 1988, 1989 by H. Roy Engehausen. All rights reserved. *)
- (* *)
- (*===========================================================================*)
-
- (*===========================================================================*)
- (* Wait for a prompt *)
- (*===========================================================================*)
-
- PROCEDURE forward_wait_prompt(path_common : path_block_ptr;
- first_prompt : BOOLEAN);
-
- VAR
- i : BYTE;
- response : STRING;
-
- BEGIN;
-
- WHILE TRUE DO
- BEGIN;
-
- task_switch;
-
- response := read_tnc_data_str;
- strip_crlf(response);
-
- i := LENGTH(response);
-
- IF (i > 0) THEN
- BEGIN;
-
- IF response[i] = '>' THEN EXIT;
-
- IF first_prompt AND (response[1] = '[') AND (response[i] = ']') THEN
- WITH active_tcb^, active_tcb^.uid_data DO
- BEGIN;
- i := POS('-', response);
- IF i <> 0 THEN
- process_sid(@response);
- first_prompt := FALSE;
- END;
-
- END;
-
- END;
-
- END;